<template>
	<div>
		<ul>
			<li v-for="m in messageList" :key="m.id">
				<!-- 给路由组件传递query参数 -->
				<router-link :to="`/home/message/detail?id=${m.id}&title=${m.title}&content=${m.content}`">{{m.title}}</router-link>
			</li>
		</ul>
		<hr/>
		<router-view></router-view>
	</div>
</template>

<script>
	export default {
		name:'Message',
		data(){
			return {
				messageList:[
					{id:'001',title:'消息1',content:'你好，中国'},
					{id:'002',title:'消息2',content:'你好，北京'},
					{id:'003',title:'消息3',content:'你好，尚硅谷'}
				]
			}
		}
	}
</script>
